package com.zjs.entity.sql;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sql_order")
@ApiModel(value = "Order对象", description = "订单表")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("订单日期")
    private LocalDate orderDate;

    @ApiModelProperty("总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("客户姓名")
    private String customerName;

    @ApiModelProperty("客户邮箱")
    private String customerEmail;

    @ApiModelProperty("客户电话")
    private String customerPhone;

    @ApiModelProperty("支付方式")
    private String paymentMethod;

    @ApiModelProperty("交易ID")
    private String transactionId;

    @ApiModelProperty("是否已支付")
    private Boolean isPaid;

    @ApiModelProperty("支付时间")
    private LocalDateTime paidTime;

    @ApiModelProperty("是否已取消")
    private Boolean isCancelled;

    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty("更新时间")
    private LocalDateTime updatedAt;

    private List<OrderItem> orderItemsList;
}
